This list is ordered top-to-bottom by priority.  
Things that are broken and need mending are at the top, 
followed by things that should work before the next release, 
followed by features that should be added/fixed/reworked (grouped by library).  

Everyone is encouraged to add to the list.  Developers can do it directly; 
anyone else can post a patch to Source Forge.  
In this way we can communicate with each
other about the project's priorities and needs.  

To Do List	$Id: TODO,v 1.93 2004/01/09 05:00:20 jklowden Exp $
------------
Broken:
. Undelimited data files should be read w/ tds_iconv_fread().
. Passing invalid character set names to server with tsql?
. Update involving triggers may not set rows_affected correctly
  Cf. ML 08 Jan 2004 "New BUG: update/delete returns -1 instead of correct
      affected rows".  

Postponed to 0.63 version
. log and call error handler on problems with tds_iconv_init().
. ct_dynamic and friends needed for DBD::Sybase placeholder support (work in progress)
. iconv
  - support string conversions for Sybase
  - input name "ASCII" must always have a canonical form (needed ??)
  - borrow GNU's libiconv m4 macro to test/provide EILSEQ
    (some iconv implementation do not return EILSEQ, some platforms do not
    define EILSEQ)
  - add test for locale_charset() to configure.in.  Use it if available
    instead of nl_langinfo, because it implies we're using GNU iconv
. add doc/htdoc/Makefile with "publish" target to commit cvs and update 
  freetds.org
. drop txt2man from cvs, skip building man pages without it. 
. Rename TDS 8.0 to TDS 7.1, to be consistent with Microsoft's name
. Rationalize libtds structure and *_alloc functions (ML 5 December 2002, sb:"names")
. be able to disable iconv for BCP (see Sybase documentation)
. UTF-8 unit tests (libTDS)
  - very large column name (128 on mssql), no-english to UTF-8 client
. userguide
  - update table of working configurations
    server (vendor, version, platform) - client (freetds version, platform) 
    - protocol - charsets - date
. FAQ
  - multiple statemets question
  - PHP workaround with multiple connections (see ML)

For future versions (in priority order within library):
  All:
. move error message macro/prototype to tds.h.in; use in dblib.c.
. Remove old char(30) limitations to various sysnames e.g., tables, columns, 
  passwords (checks).  Is this done?  
. Add missing constants needed for python and verify working
  (work in progress)
. Add missing constants needed for Gnome-DB and verify working 
. conversion from ucs2 to utf8, provide for 2+ bytes/character
  (work in progress)
. tdsping program for testing purposes
. Finish off the TDS dissector for ethereal
. more solid. handle out of memory conditions (started, we must test all 
  allocation and all function that return allocated data and be able to 
  rollback to a safe state)
. optimize numeric conversions (partial)
. limit copy of data (now wire -> tds -> temp -> client)
  use a method like zero-copy
. All manner of unimplemented functions (see doc/api_status.txt)
. cursor support (work in progress)
. tds_connect free tds structure on failure. This cause in some condition
  a pointer to garbage in some library (workaround written, best to change)
. support for named instances under mssql2k
. Autodetect TDS protocol when connecting (and cache somewhere?)
. support for VARIANT type (requested one time, 2003-8-1)
. support for NT named pipe (requested many time ago for mssql6.5 server, only
  for completeness)
. NTLMv2 domain login support.  Cf. ML 5 Aug 2003 12:20:21 -0700 (PDT) 
  from bradleyb@u.washington.edu re: "Domain Login Support, connecting to MSSQL issue"
  and http://davenport.sourceforge.net/ntlm.html.  For now, document.
. support encrypted connections
. read on partial packet, do not wait entire one
. net.c file with all network stuff

  db-lib
. Returning INT_CANCEL from an error handler doesn't always engender FAIL. 
. add DBTEXTLIMIT (dbsetopt), PHP require it to support textlimit ini value

  ct-lib
. dynamic placeholders (DBD::Sybase)
. DBD::Sybase uses the ct_command(CS_RPC_CMD) and ct_param()
. ct_option() calls (CS_OPT_ROWCOUNT, CS_OPT_TEXTSIZE, among others)
. cs_calc and cs_cmp, for sybperl
. ct_get/send_data()
. Array binding for ctlib not working
. async function, async calls (dbpoll() and friends)
. bcp support to ctlib
. support all type of bind in ct_bind (CS_VARBINARY_TYPE and other)
  search "site:.sybase.com CS_VARBINARY ct_bind" on google for more info
. support ct_command/CS_SEND_DATA_CMD, now crash
  (see http://manuals.sybase.com/onlinebooks/group-cn/cng1000e/ref/@Generic__BookTextView/50456)
. complete sqlstate and other field in message (for Python)

  odbc
. Star Office complains that these TypeInfo constants are not implemented in SQLGetInfo:
	47      SQL_USER_NAME
  (handle environment callbacks)
  do a "SELECT USER_NAME()". If data pending MS do another connection with 
  same login.
. test: SQLPutData/SQLGetData
. test: check for SQLGetTypeInfo (test column names in versions 2 and 3 
  of odbc, varchar/nvarchar should be before sysname, numeric type for data 
  with different odbc versions)
. SQLNativeSql and fill SQLGetInfo according (mssql7+ handle odbc escapes 
  directly)
. autoinstall for RPM
. test: all binding types (input and output)
. test: new descriptors work
  - ODBC 2 type returned (datetime)
  - SQLDescribeCol return ODBC 2 type or 3 or based on configuration?
  - what happen to SQL_DESC_DATETIME_INTERVAL_CODE and SQL_DESC_CONCISE_TYPE
    changing only SQL_DESC_TYPE (with SQLSetDescField)
. constants parameters in call syntax (ie {?=func(10,?)} )
. test and fix: select with compute
. test and fix: hidden fields (FOR BROWSE select)
. SQLDescribeParam (Sybase seem to require it)
. use tds_dstr* functions to store descriptor infos
. change ODBC_RETURN to return errs.lastrc (not to set) and use errs.lastrc
  to store error, cache some errors (truncated output)
. handle no termination on odbc_set_string*

  pool
. get connection pooling working with all protocol versions
. Make pool configuration a non-recompile process

  server
. Server API needs more work, especially for TDS 5.0/7.0

Tests
- "if 0 = 1 select 1" should not fail

Done in 0.62
. cursor support in ct-lib
. fix PHP problem handling empty recordsets. See messages on ML:
  Damian Kramer, September 23, "Possible bug in freeTDS"
  Steve Hanselman, September 16 "Issue with freetds 0.61.2 ..."
  Done, consequent to ct-lib cursor patch. 
. ODBC: improve, best error report (finish and test, see error.c FIXME and TODO)
. ct-lib: support ct_diag (for Python)
. ODBC test: how work mssql driver using SQLMoreResults/SQLRowCount and batch 
  like SELECT INSERT INSERT SELECT ?
  (SQLMoreResults skip row counts for INSERT?)
. ODBC: Check (and fix if needed) call to {?=store(?)} does it bind correctly?
  seem not replace first parameters
. ODBC test: what happen on:
  - "select id,name from sysobjects where name = 'sysobjects'"
  - SQLMoreResults
  - SQLMoreResults 
. Someone broke early binding in ODBC 
  (fixed, added check for early bind, and multiple recordset)
. ODBC: configure should detect iODBC or unixODBC automatically
. ODBC: Star Office complains "Statement option 109" is not implemented in SQLGetConnectOption.
. freebcp should understand \n as newline. Also \r and \0 (null byte).
. --without-libiconv to switch off iconv library
. ODBC: test NUMERIC parameter
. ODBC: dynamic query
  - SQLPutData do not work
  - Sybase and blobs do not work
    port code for string building from ODBC to libtds
    (required also for some test working using tds4.2)

Done (removed from above):
. Extend TDSSOCKET::iconv_info as an array.  Keep converters for non-UCS-2
  server charsets.  Every TDSCOLINFO holding character data should point to one of
  these elements.  
. src/dblib/unittests/t0017.c (bcp) is broken, perhaps for above reason.
. Change tds_get_char_data() per Frediano's suggestion, ML 2 May 2003, "tds_get_char_data and iconv".
. Rewrite tds_iconv (again):
	* use iconv() signature.
	* rely on TDSCOLINFO::iconv_info for conversion descriptor, instead 
	  of inferring it from the column sizes.  
	* On read error, emit Msg 2403, Severity 16 (EX_INFO):
		"WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?')."
	* On write error emit Msg 2402, Severity 16 (EX_USER):
		"Error converting client characters into server's character set. Some character(s) could not be converted."
	  and return an error code.  Do not proceed.  
	* Cf. ML 16 Apr 2003. "conversion error management".
. Add doxygen to the nightly build
. "make install" should put the UG in PREFIX/share/doc/freetds/userguide
. "make install" should put doxygen html in PREFIX/share/doc/freetds/reference
. Move website docs (not UG) to doc/htdoc, put in CVS
. Add bcp support to tds/dblib/ctlib. (started in dblib)
. RPC stuff not implemented (work in progress, libtds ok)
. Add support for TDS 8.0 (login works)
. TDS 7 Unicode to native charset conversion using iconv (partly done)
. autoconf the connection pooling stuff
. DBLIB: output params (tests)
. set database during login process
. libtds: dynamic query
. ctlib: null returns zero-length string(see "SELECT '' and TDS 7.0" in message list on 26 Jan 2003)

